1. Field of the Invention
The present invention relates generally to computer software diagnosis and debugging, and in particular, to object leakage diagnosis and debugging.
2. Description of Related Art
Computer program object leakages, that is, error conditions resulting from dynamically-allocated data or data structures that are never deallocated (e.g., freed or released), are particularly difficult to diagnose and correct. Much of the difficulty results from the nature of object leakages, since most object leakages are omission errors that occur due to the failure to do something needed (e.g., freeing or releasing an allocated object), rather than execution errors that occur due to executing incorrect code.
One specific type of object leakage is message block leakage, which occurs in computer systems which pass messages between subsystems, execution threads or other functional modules (hereinafter referred to as modules), and which results from message blocks being allocated but never deallocated. Message blocks are used, for example, in AT&T SVR4 based operating systems, such as the MP-RAS operating system, which employ streams subsystems to perform I/O related work. Functionality in the streams subsystem is divided into streams modules (and drivers), with the modules communicating with one another by passing message blocks therebetween.
Most debugging techniques are geared toward detecting execution errors, and thus, are unsuitable for debugging object leakages and other omission errors. For example, one standard debugging technique is to include specific code to catch errors. The use of specific code, however, is unsuitable for detecting omission errors, since there is often no scenario that can be detected and caught.
Another standard debugging technique is event logging, whereby specific events are recorded over time. However, for many omission errors which may be infrequent or intermittent in nature, event logging requires extensive space to maintain a log long enough to detect such errors. Particularly in large, multi-user, high availability computing environments, even infrequent/intermittent leakages can accumulate over time and cause system failures.
Another standard debugging technique is allocation tracking by origination, whereby object allocation events are recorded and assigned to the respective originating modules or execution threads. However, particularly in streams systems and the like, ownership of (and thus the responsibility for deallocating or freeing) message blocks may be transferred between modules. Consequently, simply knowing which module allocated a particular message block is not sufficient to permit adequate determination of the source of a message block leakage.
Therefore, a substantial need exists for a manner of detecting and diagnosing object leakages such as message block leakages and the like.